import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;

import javax.swing.*;

/**
 * Denne klassen lager et simpelt login-panel med GridBagLayout
 *  
 * @author Kristian
 */

public class GUILogin extends JFrame {

	public static void main(String args[]) {
		GUILogin gui = new GUILogin();
	}

	//Variabler
	JTextField loginField;
	JButton loginButton;
	JFrame frame;
	JLabel loginLabel;


	public GUILogin() {
		GridBagConstraints c = new GridBagConstraints();

		//Selve framen
		frame = new JFrame("Kalender LOGIN");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(300, 100);
		frame.setLayout(new GridBagLayout());
		frame.setResizable(false);
		frame.setVisible(true);
		
		//Login textlabel
		loginLabel = new JLabel("Ansattnummer:");
		c.weightx = 0.1;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.gridx = 0;
		c.gridy = 0;
		c.insets = new Insets(0, 0, 0, 0);
		frame.add(loginLabel, c);
		
		
		//Login textfield
		loginField = new JTextField();
		c.weightx = 1;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.gridx = 1;
		c. gridy = 0;
		c.insets = new Insets(0, 0, 0, 0);
		frame.add(loginField, c);

		//Login button
		loginButton = new JButton("Logg inn");
		c.weightx = 1;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.gridx = 2;
		c.gridy = 0;
		c.insets = new Insets(0, 0, 0, 0);
		frame.add(loginButton, c);

	}
}